<switch name="type">
    <case value="question">
    <form method="POST" action="{:U('Modcp/approveQuestion',array('type'=>$type))}">
        <input type="hidden" name="mods[]" value="{$question.question_id}" />
        <div class="mod-container container">
            <h2 class="line">{$question.title|Input::forShow}</h2>
            <notempty name="question.details">
            <p class="content line">{$question.details|parse_markup=$question['markup_mode']}</p>
            </notempty>
            <ul class="meta line">
                <li>{$Think.lang.asked_by} <a href="{$question.poster_id|format_user_url=$question['poster_name']}">{$question.poster_name}</a> - </li>
                <li>{$Think.lang.in} <a href="{$question.category_id|format_category_url}">{$question.category_id|get_category_name}</a> - </li>
                <li>{$question.answer_count} {$Think.lang.answer_count} - </li>    
                <li><abbr title="{$question.create_time|format_date}">{$question.create_time|pretty_date}</abbr> - </li>
                <li><a href="javascript:ipToCountry('{$question.poster_ip}');" title="{$Think.lang.view_ip}">{$question.poster_ip}</a></li>
            </ul>
            <ul class="actions">
		        <li><input name="approve" class="button" type="submit" value="{$Think.lang.mcp_approve}" /></li>
		        <li><input name="disapprove" class="alt-button" type="submit" value="{$Think.lang.mcp_disapprove}" /></li>
		    </ul>
        </div>
    </form>
    </case>
    
    <case value="answer">
    <form method="POST" action="{:U('Modcp/approveAnswer',array('type'=>$type))}">
        <div class="mod-container container">
            <h2>{$question.title|Input::forShow}</h2>
            <notempty name="question.details">
            <p class="content">{$question.details|parse_markup=$question['markup_mode']}</p>
            </notempty>
            <ul class="meta line">
                <li>{$Think.lang.asked_by} <a href="{$question.poster_id|format_user_url=$question['poster_name']}">{$question.poster_name}</a> - </li>
                <li>{$Think.lang.in} <a href="{$question.category_id|format_category_url}">{$question.category_id|get_category_name}</a> - </li>
                <li>{$question.answer_count} {$Think.lang.answer_count} - </li>    
                <li><abbr title="{$question.create_time|format_date}">{$question.create_time|pretty_date}</abbr> - </li>
                <li><a href="javascript:ipToCountry('{$question.poster_ip}');" title="{$Think.lang.view_ip}">{$question.poster_ip}</a></li>
            </ul>
            <h2>{$Think.lang.mcp_unapproved_answers}</h2>
            <volist name="answers" id="vo">
            <p class="content">{$vo.details|parse_markup=$vo['markup_mode']}</p>
            <ul class="meta line">
            	<li><span class="mark-2"><input class="mark" type="checkbox" name="mods[]" value="{$vo.answer_id}" /></span></li>
                <li>{$Think.lang.answered_by} <a href="{$vo.poster_id|format_user_url=$vo['poster_name']}">{$vo.poster_name}</a> - </li>
                <li><abbr title="{$vo.create_time|format_date}">{$vo.create_time|pretty_date}</abbr> - </li>
                <li><a href="javascript:ipToCountry('{$vo.poster_ip}');" title="{$Think.lang.view_ip}">{$vo.poster_ip}</a></li>
            </ul>
            </volist>
            <ul class="actions">
		        <li><input id="mark-all-2" class="mark" type="checkbox" value="1" /></li>
		        <li><input name="approve" class="button" type="submit" value="{$Think.lang.mcp_approve}" /></li>
		        <li><input name="disapprove" class="alt-button" type="submit" value="{$Think.lang.mcp_disapprove}" /></li>
		    </ul>
        </div>
    </form>
    </case>
    
    <case value="comment">
    <form method="POST" action="{:U('Modcp/approveComment',array('type'=>$type))}">
        <div class="mod-container container">
            <eq name="comment.type" value="Q">
            <h2>{$question.title|Input::forShow}</h2>
            <notempty name="question.details">
            <p class="content">{$question.details|parse_markup=$question['markup_mode']}</p>
            </notempty>
            <ul class="meta line">
            	<li>{$Think.lang.asked_by} <a href="{$question.poster_id|format_user_url=$question['poster_name']}">{$question.poster_name}</a> - </li>
                <li>{$Think.lang.in} <a href="{$question.category_id|format_category_url}">{$question.category_id|get_category_name}</a> - </li>
                <li>{$question.answer_count} {$Think.lang.answer_count} - </li>    
                <li><abbr title="{$question.create_time|format_date}">{$question.create_time|pretty_date}</abbr> - </li>
                <li><a href="javascript:ipToCountry('{$question.poster_ip}');" title="{$Think.lang.view_ip}">{$question.poster_ip}</a></li>
            </ul>
            </eq>
            <eq name="comment.type" value="A">
            <p class="content">{$answer.details|parse_markup=$answer['markup_mode']}</p>
            <ul class="meta line">
                <li>{$Think.lang.answered_by} <a href="{$answer.poster_id|format_user_url=$answer['poster_name']}">{$answer.poster_name}</a> - </li>
                <li>{$answer.comment_count} {$Think.lang.comment_count} - </li>    
                <li><abbr title="{$answer.create_time|format_date}">{$answer.create_time|pretty_date}</abbr> - </li>
                <li><a href="javascript:ipToCountry('{$answer.poster_ip}');" title="{$Think.lang.view_ip}">{$answer.poster_ip}</a></li>
            </ul>
            </eq>    
            <h2>{$Think.lang.mcp_unapproved_comments}</h2>
            <volist name="comments" id="vo">
            <p class="content">{$vo.details|parse_markup=$vo['markup_mode']}</p>
            <ul class="meta line">
                <li><span class="mark-2"><input class="mark" type="checkbox" name="mods[]" value="{$vo.comment_id}" /></span></li>
            	<li>{$Think.lang.commented_by} <a href="{$vo.poster_id|format_user_url=$vo['poster_name']}">{$vo.poster_name}</a> - </li>
                <li><abbr title="{$vo.create_time|format_date}">{$vo.create_time|pretty_date}</abbr> - </li>
                <li><a href="javascript:ipToCountry('{$vo.poster_ip}');" title="{$Think.lang.view_ip}">{$vo.poster_ip}</a></li>
            </ul>
            </volist>
            <ul class="actions">
		        <li><input id="mark-all-2" class="mark" type="checkbox" value="1" /></li>
		        <li><input name="approve" class="button" type="submit" value="{$Think.lang.mcp_approve}" /></li>
		        <li><input name="disapprove" class="alt-button" type="submit" value="{$Think.lang.mcp_disapprove}" /></li>
		    </ul>
        </div>
    </form>
    </case>
</switch>

<load href="__PUBLIC__/Js/jquery.selectAll.js" />
<script type="text/javascript">
$('#mark-all-2').selectAll({range:'.mark-2'});	
</script>
